#include "processbar.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define NUM 101
#define STYLE '#'

void process(){
	int cnt = 0;
	char bar[NUM];
	const char* loop = "/-\\|";
	memset(bar, '\0',sizeof(bar));
	int sz = strlen(loop);
	while(cnt < NUM){
		printf("[%-100s][%d%%][%c]\r", bar,cnt,loop[cnt % sz]);
		fflush(stdout);
		bar[cnt] = STYLE;
		cnt++;
		usleep(50000);
	}
	printf("\r\n");
	
}


